﻿Imports DTO
Imports System.Data.SqlClient

Public Class CSachThanhLyDAO
    Public Function CapNhatSachThanhLy(ByVal _sachthanhlydto As CSachThanhLyDTO) As Integer
        Using cn As SqlConnection = CDataProvider.Connect()
            Dim cm As New SqlCommand("usp_ThanhLySach", cn)
            cm.CommandType = CommandType.StoredProcedure
            Dim para As New SqlParameter("@masach", _sachthanhlydto.Ma)
            cm.Parameters.Add(para)
            para = New SqlParameter("@tenlydo", _sachthanhlydto.TenLyDo)
            cm.Parameters.Add(para)
            para = New SqlParameter("@manv", _sachthanhlydto.MaNhanVien)
            cm.Parameters.Add(para)
            Dim kq As Integer = cm.ExecuteNonQuery()
            Return kq
        End Using
    End Function
End Class
